﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronWiki
{
    [Description("A class that provides a number of utility properties")]
    public static class UtilityProperties
    {
        [Description("Provides a newline in the text")]
        public static string Newline { get { return "\r\n"; } }
        [Description("Provides the current DateTime")]
        public static string Now { get { return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } }
        [Description("Provides a tab in the text")]
        public static string Tab { get { return "\t"; } }
        [Description("Provides the name of the application")]
        public static string ProductName { get { return "LynxWiki"; } }
        [Description("Provides the name of the scripting language")]
        public static string ScriptEngineName { get { return "IronWiki"; } }

        //private void LoadPlugins()
        //{
        //    FederationConfiguration configuration = Federation.Configuration;
        //    if (configuration == null)
        //        return;

        //    foreach (string plugin in configuration.Plugins) {
        //        System.Reflection.Assembly.Load(plugin);
        //    }
        //}

    }

    public class ScriptOutput
    {
        public string AppendLine(string newData, string existingData)
        {
            return existingData + "\n\r" + newData;
        }
    }
}
